home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / hdf_exists.pro < prev    next >
Text File  |  1997-07-08  |  1KB  |  57 lines

  1. ; $Id: hdf_exists.pro,v 1.4 1997/02/22 02:33:32 ali Exp $
  2. ;
  3. ; Copyright (c) 1992-1997, Research Systems, Inc.  All rights reserved.
  4. ;    Unauthorized reproduction prohibited.
  5. ;
  6. ;+
  7. ; NAME:
  8. ;    HDF_EXISTS
  9. ;
  10. ; PURPOSE:
  11. ;    Test for the existence of the HDF library
  12. ;
  13. ; CATEGORY:
  14. ;    File Formats
  15. ;
  16. ; CALLING SEQUENCE:
  17. ;    Result = HDF_EXISTS()
  18. ;
  19. ; INPUTS:
  20. ;    None.
  21. ;
  22. ; KEYWORD PARAMETERS:
  23. ;    None.
  24. ;
  25. ; OUTPUTS:
  26. ;    Returns TRUE (1) if the HDF data format library is
  27. ;    supported. Returns FALSE(0) if it is not.
  28. ;
  29. ; EXAMPLE:
  30. ;    IF hdf_exists() EQ 0 THEN Fail,"HDF not supported on this machine"
  31. ;
  32. ; MODIFICATION HISTORY
  33. ;    Written by:    Joshua Goldstein,  12/21/92
  34. ;    Modified by:    Steve Penton,       12/27/95
  35. ;
  36. ;-
  37.  
  38. ;    A fake function if libraries don't exist
  39. FUNCTION hdf_df24_lastref,x
  40.     return,1
  41. END
  42.  
  43. ;
  44. FUNCTION hdf_exists
  45.     ; CDF is not available in the IDL Student Edition.
  46.     ;
  47.     ; NOTE: The LMGR function is undocumented, considered private
  48.     ; to RSI, and is subject to change or removal from IDL at any
  49.     ; time without notice.
  50.     if (LMGR(/STUDENT) eq 1) then return, 0
  51.  
  52.     exists=0
  53.     x=hdf_df24_lastref();
  54.     if x LE 0 THEN return,1
  55.     return,0
  56. END
  57.